<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="landmark.LandmarkUtente"%>
<%@ page import="java.util.Collection" %>
<%@page import="landmark.Link"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Crea lavoro</title>
<link rel="stylesheet" type="text/css" href="scheletro.css">
</head>
<body>
<div id="container">
<table class="topHome">
	<tr>
		    <td id="logoHome">
	<a href="home.jsp">Swim v2</a>
	<br><br><b> A help with a click!</b>

		    </td>
			<td class="personal">
		
				<b>Ciao :<a href="PaginaProfiloServlet">${sessionScope.utente.nome}</a> </b>&nbsp;&nbsp;&nbsp;<a href="Notifiche"><b>Interazioni</b></a>&nbsp;<a href="messaggi.jsp"><b>Messaggi</b></a>&nbsp;&nbsp;&nbsp;<div id="button"><a href="Logout" id="logout">Logout</a></div>

			</td>		
	</tr>
</table>


<%String messaggio = (String) request.getAttribute("messaggio");
	if(messaggio != null) {
				out.println("<p class='errorMessage'>" + messaggio + "</p>");
		} %>



<div id="nav"> 
	<ul>
		<%
			Link a[]  = LandmarkUtente.getLandmark();
			for(int i=0; i<a.length; i++)
			{
		%>
			<%
				if(a[i].getValue().equalsIgnoreCase("Lavori"))
				{
			%>
				<li><a href="<%=a[i].getHref() %>"><u><%=a[i].getValue() %></u></a></li>
			<%	}
			%>
			
			<%	if(!a[i].getValue().equalsIgnoreCase("Lavori"))
				{
			%>
				<li><a href="<%=a[i].getHref() %>"><%=a[i].getValue() %></a></li>
			<%} 
			%>
		<%} 
		%>
	</ul>
</div>

<div id="form">

<form action="CreaLavoro" method="post" id="form_newWork">
   <fieldset>
  	<legend>Crea un nuovo lavoro</legend>
 	 <br><br>
  	
                <label for="nomeLavoro">Nome</label>
                <input type="text" name="nome" id="nome" size="70"/> 
                <br><br>
        		<label for="sede">Sede</label>
                <input type="text" name="sede" id="sede" size="70"/><br><br><br>
                
                <b>Abilità richieste:</b>
                
                <%
					@SuppressWarnings("unchecked")
					Collection<String> listAb= (Collection<String>) request.getAttribute("listAb");		
					if(listAb.size()>0) {
						%>
					<table line-height="5">
					<%
						for(String s: listAb) {
							
						%>
	                  <tr>
	                   	<td>  
		                    <label for="ab"><% out.print(s);%></label>
		                </td>
		                <td>
		                    <input type="checkbox" name="ab" id="ab" value="<% out.print(s); %>"/>
						</td>            	  
	                  </tr>
                	<%
							
						}
						%>
						</table>
					<% }%>
                <br><br>
                
	</fieldset>
	<input id="button" type="submit" name="submit" value="Crea Lavoro" />
</form>


</div>
</div>
</body>
</html>